package pro.ticktock.tools.mbconv;

/*
 * Author: lambo
 * Date: 2018-09-20
 */
public class Pair<T, E>
{
  public T first;
  public E second;

  public Pair(T first, E second) {
    this.first = first;
    this.second = second;
  }

  public Pair(){

  }

  public String toString() {
    return "Pair[" + first + ", " + second + "]";
  }

  public int hashCode() {
    return first.hashCode() ^ second.hashCode();
  }

  public boolean equals(Object o) {
    if (o == null || !(o instanceof Pair<? ,?>)) {
      return false;
    }

    return first.equals(((Pair)o).first) && second.equals(((Pair)o).second);
  }
}
